package com.example.basic.service;

import com.example.basic.controller.dto.FileDTO;
import com.example.basic.controller.dto.SocketPayloadDTO;
import com.example.basic.domain.Games;
import org.springframework.validation.BindingResult;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * @author mjw
 * @date 2023/8/28
 */
public interface TestService {

    void syncTest() throws InterruptedException;


    /**
     * 测试事务
     */
    void testTransaction();

    void addStep1();
    void addStep1_1();

    void addStep1_2();

    void addStep2();

    void openUrl(HttpServletResponse response);

    Map<Integer, Map<Integer, String>> validateTemplate(HttpServletResponse response, MultipartFile excel);

    String testApis();

    List<String> validGames(Games games, BindingResult bindingResult);

    void download(HttpServletRequest request, HttpServletResponse response);

    void downloadPdf(HttpServletResponse response, String fileUrl);

    String validJson(Games games);

    void downloadZip(HttpServletResponse response, List<FileDTO> fileDTOList);

    String socketInvoke(SocketPayloadDTO dto);

}
